'use client';

import { usePathname } from 'next/navigation';
import DashboardSidebar from '@/components/dashboard/dashboard-sidebar';

export default function ConditionalSidebar() {
  const pathname = usePathname();

  // 当路由以 /dashboard 开头时才显示侧边栏
  if (!pathname.startsWith('/dashboard')) {
    return null;
  }

  return <DashboardSidebar />;
}
